using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;

namespace TodoSoft.Data
{
    public interface ISqlCommandProcessor : IDisposable
    {
        void ExecuteNonQuery(string sqlText, params object[] args);
		object ExecuteScalar(string query, params object []args);
		
        void TransactionBegin();
        void TransactionCommit();
        void TransactionRollback();

        bool IsTableExist(string tableName);

	    /// <summary>
	    /// Creates the table with one column named as table +'id' and type of Guid.
	    /// </summary>
	    /// <param name="repayDebtDoc"></param>
	    /// <param name="idFieldName"></param>
	    /// <param name='interview'>
	    /// Table name.
	    /// </param>
	    void CreateTable(string repayDebtDoc, string idFieldName);
		void CreateTable(string repayDebtDoc);
		void AlterTableAddColumn(string tableName, string name, Type type, int size);
		void AlterTableAddColumn(string tableName, string name, Type type);
    	void AlterTableDropColumn(string tableName, string columnName);
	    void AlterTableAddColumn(string tableName, string columnName, string dbTypeName);
	    void AlterTableChangeColumnType(string tableName, string name, Type type, int i);
	    void Insert(string documentTypeTable, string[] fields, object[] values);
	    IDataReader ExecuteReader(string queryText, params object[] parameters);
		IDataReader ExecuteReader(string queryText, Dictionary<string, object> parameters);
	    void AlterTableAddIndex(string tableName, string fieldName);
	    void AlterTableAddPrimaryKey(string documentsubtype, string documentsubtypeid);
	    void DropTable(string documenttype);
	    void AlterTableDropIndex(string table, string field);
    }
}

